package com.lzj.jiangxindaojia.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lzj.jiangxindaojia.R;


/**
 * Created by lizj on 2017/10/11.
 */

public abstract class BaseActivity extends FragmentActivity implements View.OnClickListener{

    private LinearLayout ll_base;
    private LinearLayout ll_net;
    private TextView tv_net;
    private TextView tv_reset_net;
    private View activityLayout;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_base);

//        this.tv_net = ((TextView)findViewById(R.id.tv_net));
//        this.tv_reset_net = ((TextView)findViewById(R.id.tv_reset_net));
//        this.ll_net = ((LinearLayout)findViewById(R.id.ll_net));
        this.ll_base = ((LinearLayout)findViewById(R.id.ll_base));
        activityLayout = getLayoutInflater().inflate(getLayoutId(), null);
        this.ll_base.addView(activityLayout);
        initData();
        setListener();
        requestServer();
    }


    public abstract int getLayoutId();

    protected void initData() {}

    protected void requestServer() {}

    protected void setListener() {}
}
